#include <iostream>
using namespace std;

int num[33] = {1};

int main() {
	int len;
	int temp = 0;
	cin >> len;
	for (int i = 0; i < len; i++) {
		temp = 0;
		for (int j = 0; j <= i; j++) {
			if (j == i) {
				num[j] = 1;
			} else {
				int temps = temp;
				temp = num[j];
				num[j] = num[j] + temps;
			}
			cout << num[j];
			if (j != i)
				cout << ' ';
			else
				cout << endl;
		}
	}
}